package com.matt.domain.nursery;

import com.matt.commons.model.Domain;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * *******************************
 * 托班排课审核
 * Created by lch.
 * form com.matt
 * on 2018/12/04
 * *******************************
 */
@Entity
@Table(name = "nursery_schedule_check")
@Data
@EqualsAndHashCode(callSuper = true)
public class NurseryScheduleCheck extends Domain {

    @Column(columnDefinition = "varchar(32) COMMENT '班级id'")
    private String classesId;

    @Column(columnDefinition = "int default 0 COMMENT '审核状态 0：待审核  1：审核通过  2：未通过'")
    private Integer status=0;

    @Column(columnDefinition = "varchar(32) COMMENT '园区id'")
    private String areaId;

    @Column(columnDefinition = "varchar(32) COMMENT '审核人id'")
    private String checkStaffId;

    @Column(columnDefinition = "varchar(255) COMMENT '审核人姓名'")
    private String checkStaffName;

    @Column(columnDefinition = "varchar(32) COMMENT '修改id'")
    private String updateStaffId;

    @Column(columnDefinition = "varchar(255) COMMENT '修改人姓名'")
    private String updateStaffName;

    @Column(columnDefinition = " datetime COMMENT '修改时间'")
    private Date updateDate ;

    @Column(columnDefinition = " datetime COMMENT '排课开始时间'")
    private Date beginDate;

    @Column(columnDefinition = " datetime COMMENT '排课结束时间'")
    private Date endDate;

    public static NurseryScheduleCheck of(String classesId,Integer status,Date beginDate,Date endDate,String updateStaffId,
                                          String updateStaffName,Date updateDate,String areaId){
        NurseryScheduleCheck vo = new NurseryScheduleCheck();
        vo.setClassesId(classesId);
        vo.setStatus(status);
        vo.setBeginDate(beginDate);
        vo.setEndDate(endDate);
        vo.setUpdateStaffId(updateStaffId);
        vo.setUpdateStaffName(updateStaffName);
        vo.setUpdateDate(updateDate);
        vo.setAreaId(areaId);
        return vo;
    }


}
